Imports Entidades


Public Class N_Paquete


    'Public Interface IPaquete

    '    Function AgregarPaquete(ByVal p As E_Paquete) As Integer
    '    Function BorrarPaquete(ByVal n As Integer) As Boolean
    '    Function TraerPaquetesPorEnvio(ByVal n As Integer) As DataSet

    'End Interface

    Public Function AgregarPaquete(ByVal item As Entidades.E_Paquete) As Int32

        Dim oDatos As Datos.D_Paquete

        Try
            oDatos = New Datos.D_Paquete

            Return oDatos.Agregar_Paquete(item)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Sub BorrarPaquete(ByVal id As Integer)

        Dim oDatos As Datos.D_Paquete

        Try
            oDatos = New Datos.D_Paquete

            oDatos.Borrar_Paquete(id)
        Finally
            oDatos = Nothing
        End Try
    End Sub


    Public Function TraerPaquetesPorEnvios(ByVal id As Integer)


        Dim oDatos As Datos.D_Paquete

        Try
            oDatos = New Datos.D_Paquete

            Return oDatos.TraerPaquetes_PorEnvio(id)

        Finally
            oDatos = Nothing
        End Try
    End Function

End Class
